/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package FrameWork;

import GamePlay.Global;
import java.io.IOException;
import javax.microedition.lcdui.Image;

/**
 *
 * @author ThanhTri
 */
public class RSFont {
    private static RSFont instance = null;
    public static RSFont getRS (){
         if( instance == null){
             instance =  new RSFont();
         }
         return instance;
    }
    MySpriteFont m_Small;
    MySpriteFont m_Large;
    private RSFont (){
        try {
            m_Small = new Font_Small(Image.createImage("/Image/smallfont.png"));
            m_Large = new Font_Large(Image.createImage("/Image/bigfont.png"));
            
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }
    public MySpriteFont getFont (int _ID){
        MySpriteFont sReturn = null;
        switch (_ID){
            case Global.FONT_SMALL:
                sReturn = m_Small;
                break;
            case Global.FONT_BIG:
                sReturn = m_Large;
                break;
        }
        return sReturn;
    }
    public MySpriteFont getSmall(){
        return   m_Small;
    }
    public MySpriteFont getLarge(){
        return   m_Large;
    }
}
